<?php
namespace app\course\model;

use think\Model;

class course extends Model{
    public function courselist(){
        $data =  $this->select();
        return $data;
    }

    public function newcourse(){
        $data = $this->limit(1)->order('Id desc') ->select();
        return $data;
    }

    public function addcourse($courseId,$courseName){
        $Data = [
            "courseId" => $courseId,
            "courseName" => $courseName,
        ];
        return $this->insert($Data);
    }
}